<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileOverview 마이스크랩 > 폴더영역 > 폴더 순서 변경 
<span class='line'>  3</span>  * @author qpitlove
<span class='line'>  4</span>  */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.myscrap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.myscrap</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="NAME">nhn.newsstand.myscrap.FolderMove</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Class</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="WHIT">	</span><span class="COMM">/** @lends nhn.newsstand.myscrap.FolderMove.prototype */</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 12</span> 	 * nhn.newsstand.myscrap.FolderMove 클래스의 인스턴스를 생성한다.  
<span class='line'> 13</span> 	 * @constructs
<span class='line'> 14</span> 	 * @class 마이스크랩 > 폴더영역 > 폴더 순서 변경
<span class='line'> 15</span> 	 * @requires nhn.newsstand.common.util
<span class='line'> 16</span> 	 * @param {nhn.newsstand.myscrap.FolderTree} oFolderTree oFolderTree nhn.newsstand.myscrap.FolderTree 인스턴스
<span class='line'> 17</span> 	 * @see nhn.newsstand.myscrap.FolderTree
<span class='line'> 18</span> 	 * @example
<span class='line'> 19</span> 	 * var folderTree = new nhn.newsstand.myscrap.FolderTree($$.getSingle(".folder_area ul.folder_lst"));
<span class='line'> 20</span> 	 * var folderMove = new nhn.newsstand.myscrap.FolderMove(folderTree);
<span class='line'> 21</span> 	 */</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">	</span><span class="NAME">$init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oFolderTree</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">		</span><span class="NAME">this.oFolderTree</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oFolderTree</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">		</span><span class="NAME">this._attachHTMLElementEvent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 28</span> 	 * Element에 이벤트를 바인딩 한다.
<span class='line'> 29</span> 	 */</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">	</span><span class="NAME">_attachHTMLElementEvent</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oLayerBubbler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">oUtil.Bubbler</span><span class="PUNC">(</span><span class="NAME">document</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">		</span><span class="NAME">oLayerBubbler.attach</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">			</span><span class="STRN">"_movefolder:click"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">eEvent</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">elTarget</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aArgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">				</span><span class="NAME">eEvent.stopDefault</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="WHIT">				</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">				</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">aArgs</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">aArgs.length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">selectedNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.oFolderTree.getSelectedNode</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">					</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT">	</span><span class="PUNC">!</span><span class="NAME">selectedNode</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">						</span><span class="NAME">selectedNode</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">self.oFolderTree.getTotalNode</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 41</span> </span><span class="WHIT">						</span><span class="NAME">selectedNode</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">self.oFolderTree.getMyFolderNode</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">					</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._convertRequestParamByKeyword</span><span class="PUNC">(</span><span class="NAME">aArgs</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">self.oFolderTree.getFolderSeqByNode</span><span class="PUNC">(</span><span class="NAME">selectedNode</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">					</span><span class="NAME">self.requestFolderMove</span><span class="PUNC">(</span><span class="NAME">oParam.folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam.order</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam.parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">				</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 50</span> 	 * 데이터 통신시 호출될 callback함수 등록
<span class='line'> 51</span> 	 * @param  {nhn.newsstand.common.page.Requester} oRequester 데이터 통신 객체
<span class='line'> 52</span> 	 * @see nhn.newsstand.common.page.Requester
<span class='line'> 53</span> 	 */</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">	</span><span class="NAME">bindRequester</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oRequester</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">		</span><span class="NAME">this.oRequester</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oRequester</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">		</span><span class="NAME">this.oRequester.attach</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">			</span><span class="NAME">loadCallback</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">$Fn</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oCustomEvent</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oCustomEvent.result</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oCustomEvent.param</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">				</span><span class="NAME">this.updateHTMLElement</span><span class="PUNC">(</span><span class="NAME">oResult</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">bind</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 66</span> 	 * 드래그 가능한 하위 노드들을 가져온다.
<span class='line'> 67</span> 	 * @param  {HTMLElement} elParentNode 상위 노드 
<span class='line'> 68</span> 	 * @return {HTMLElement} 
<span class='line'> 69</span> 	 */</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="NAME">getMoveableChildNodes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">		</span><span class="COMM">//마이폴더와 전체 폴더를 제외한 폴더를 실제 이동가능한 폴더로 지정한다.</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">moveableChildNodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childNodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getChildNodes</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">childNodes.length</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">childNodes</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getTotalNode</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">childNodes</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getMyFolderNode</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">			</span><span class="NAME">moveableChildNodes.push</span><span class="PUNC">(</span><span class="NAME">childNodes</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">moveableChildNodes</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 81</span> 	 * 요청 파라미터를 변경하는 함수
<span class='line'> 82</span> 	 */</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">	</span><span class="NAME">_convertRequestParamByKeyword</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sMoveKeyword</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">folderSeq</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">sMoveKeyword</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getNodeByFolderSeq</span><span class="PUNC">(</span><span class="NAME">folderSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elParentNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getParentNode</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waMoveableChildNodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$A</span><span class="PUNC">(</span><span class="NAME">this.getMoveableChildNodes</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">		</span><span class="KEYW">switch</span><span class="PUNC">(</span><span class="NAME">sMoveKeyword</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"FIRST"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">			</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"PREV"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">prevNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getPreviousNode</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">			</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">prevNode</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">waMoveableChildNodes.indexOf</span><span class="PUNC">(</span><span class="NAME">prevNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"NEXT"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nextNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getNextNode</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">			</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">nextNode</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">waMoveableChildNodes.length</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">waMoveableChildNodes.indexOf</span><span class="PUNC">(</span><span class="NAME">nextNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">		</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="STRN">"LAST"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">			</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">waMoveableChildNodes.length</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">			</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//이전 노드가 내 폴더 일경우, 전체 폴더개수가 0일 경우도 고려해야 함</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">folderSeq</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">				 </span><span class="NAME">order</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="COMM">//실제 Ajax 요청시에는 인덱스가 1부터 시작함 </span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">				 </span><span class="NAME">parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.isRootNode</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getFolderSeqByNode</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>115</span> 	 * 폴더 이동 후 데이터 갱신을 요청하는 함수
<span class='line'>116</span> 	 * @param {Number}  folderSeq 현재 폴더 sequence 
<span class='line'>117</span> 	 * @param {Number}  orderIndex 정렬 index  
<span class='line'>118</span> 	 * @param {Number}  parentFolderSeq 부모폴더 sequenc
<span class='line'>119</span> 	 * @requires nhn.newsstand.common.page.Requester 
<span class='line'>120</span> 	 */</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">	</span><span class="NAME">requestFolderMove</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">order</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.oRequester</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">		</span><span class="NAME">this.oRequester.requestContents</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">folderSeq</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">order</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">order</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>128</span> 	 * 요청한 order에 따라 노드의 인덱스를 변경하는 함수 
<span class='line'>129</span> 	 */</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="NAME">_convertNodeIndexByRequestOrder</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nOrder</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">		</span><span class="COMM">//UI에서 1차 폴더 이동 시 이동시 전체노드 + 마이 폴더 인덱스를 고려함 </span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">		</span><span class="NAME">nOrder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">nOrder</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nOrder</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">nOrder</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">//request param은 1부터 시작되므로 0 기준으로 변경</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>137</span> 	 * HTML영역 업데이트 하는 함수
<span class='line'>138</span> 	 * @param {object}  oResult 서버로 부터 전달 받은 데이터 
<span class='line'>139</span> 	 * @param {object}  oParam 요청한 파라미터  
<span class='line'>140</span> 	 */</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">	</span><span class="NAME">updateHTMLElement</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oResult</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">		</span><span class="COMM">//Ajax 요청과 실제 노드의 Index와는 별도로 처리함</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">		</span><span class="NAME">this.moveFolder</span><span class="PUNC">(</span><span class="NAME">oParam.folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._convertNodeIndexByRequestOrder</span><span class="PUNC">(</span><span class="NAME">oParam.order</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam.parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">oParam.parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>147</span> 	 * 폴더 이동시 호출되는 함수
<span class='line'>148</span> 	 * @param {Number}  folderSeq 현재 폴더 sequence 
<span class='line'>149</span> 	 * @param {Number}  orderIndex 정렬 index  
<span class='line'>150</span> 	 * @param {Number}  parentFolderSeq 부모폴더 sequence  
<span class='line'>151</span> 	 */</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">	</span><span class="NAME">moveFolder</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">folderSeq</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">		</span><span class="COMM">//1차 폴더인경우 전체 폴더와 마이폴더 위로 이동할수 없으므로 내 폴더 하단에 추가되도록 orderIndex를 1로 설정한다.</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">parentFolderSeq</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">			</span><span class="NAME">orderIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Math.max</span><span class="PUNC">(</span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getNodeByFolderSeq</span><span class="PUNC">(</span><span class="NAME">folderSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elOldParentNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getParentNode</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elParentNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentFolderSeq</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getNodeByFolderSeq</span><span class="PUNC">(</span><span class="NAME">parentFolderSeq</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">elOldParentNode</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elChildNodeContainer</span><span class="WHIT">  </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getChildNodeContainer</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">childLength</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getChildNodes</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">		</span><span class="KEYW">switch</span><span class="PUNC">(</span><span class="NAME">orderIndex</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">			</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">				</span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">elChildNodeContainer</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">prepend</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">			</span><span class="KEYW">case</span><span class="WHIT"> </span><span class="NAME">childLength</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">				</span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">elChildNodeContainer</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">			</span><span class="KEYW">default</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">				</span><span class="COMM">//이동하려는 폴더를 리스트에서 임시로 제외해야 실제 이동하려는 orderIndex의 위치를 제대로 얻을 수 있음 </span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">welNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">elNode</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">leave</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">welNextNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">this.oFolderTree.getChildNodeByIndex</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">orderIndex</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">				</span><span class="NAME">welNextNode</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">  </span><span class="NAME">welNextNode.before</span><span class="PUNC">(</span><span class="NAME">welNode</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">elChildNodeContainer</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">welNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">				</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">		</span><span class="COMM">//LastNode 갱신 </span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">		</span><span class="NAME">this.oFolderTree.paintNode</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">		</span><span class="COMM">//동일한 부모폴더 내에서 이동한 게 아니라면  이전 부모폴더도 repaint LastNode 갱신 </span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">elOldParentNode</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">			</span><span class="NAME">this.oFolderTree.paintNode</span><span class="PUNC">(</span><span class="NAME">elOldParentNode</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">		</span><span class="COMM">//이동된 폴더가 2차 폴더이면 부모 폴더의 버튼 스타일 변경</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.oFolderTree.isRootNode</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">			</span><span class="NAME">this.oFolderTree.updateParentNodeBtn</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>188</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.oFolderTree.isRootNode</span><span class="PUNC">(</span><span class="NAME">elOldParentNode</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">			</span><span class="NAME">this.oFolderTree.updateParentNodeBtn</span><span class="PUNC">(</span><span class="NAME">elOldParentNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">		</span><span class="NAME">this.oFolderTree.expandNode</span><span class="PUNC">(</span><span class="NAME">elParentNode</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>195</span> 	 * 폴더 이동 버튼 토글 하는 함수  
<span class='line'>196</span> 	 */</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">	</span><span class="NAME">toggleFolderMoveBtn</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">bActive</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.oFolderTree.getAllNodes</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//디폴트 폴더 갯수가 3개이므로 4개보다 작은 경우는 사용자가 만든 폴더가 없을 때.</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aElBtn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$$</span><span class="PUNC">(</span><span class="STRN">'div.btn_area> ul> li > a'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">welBtn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aElBtn.length</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">nIdx</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">			</span><span class="NAME">welBtn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">aElBtn</span><span class="PUNC">[</span><span class="NAME">nIdx</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">			</span><span class="NAME">bActive</span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">welBtn.show</span><span class="PUNC">(</span><span class="STRN">"block"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">welBtn.hide</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>206</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>